package org.example;

import java.io.IOException;
import java.lang.management.ManagementFactory;

/**
 * https://zhuanlan.zhihu.com/p/636603910?utm_id=0
 */
public class Base {
    public static void main(String[] args) throws IOException {
        System.out.println("Base类的main方法执行了----Runtime.getRuntime="+Runtime.getRuntime());
        String name = ManagementFactory.getRuntimeMXBean().getName();
        System.out.println(name);
        String s = name.split("@")[0];
        // 打印当前Pid
        System.out.println("pid:" + s);
        System.in.read();
    }
}
